package com.interceptor;
//测试类
public class Client {

	public static void main(String[] args) {

		TargetInterface target=new Target();//生成目标对象
		MyProxy myProxy=new MyProxy();//生成代理类，类似工厂类
		TargetInterface proxy=(TargetInterface)myProxy.getProxy(target);
		proxy.doSomething();//执行代理
	}

}
